import router from "@/router";
import { getItem, key } from "./utils/storage";
const userList = ["/favorate", "/rent"];
router.beforeEach((to, from, next) => {
  const token = getItem(key);
  if (token) {
    next();
  } else {
    if(userList.includes(to.path)){
      next("/login");
    }else{
      next()
    }
   
  }
});
